<%-- 
    Document   : index
    Created on : Sep 2, 2011, 2:04:18 AM
    Author     : Belinda
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.util.ArrayList, BusinessLogic.Constants, EntityState.CustomerState" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <!-- InstanceBegin template="../TransactWeb//Templates/FdSage.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <!-- InstanceBeginEditable name="doctitle" -->
        <title>Customer Homepage</title>
        <script type="text/javascript" src="../TransactWeb/js/detectTimezone.js"></script>
        <!-- InstanceEndEditable -->
        <script language="javascript" type="text/javascript" src="../TransactWeb/js/jquery-1.6.4.min.js"></script>
        <script type="text/javascript" src="../TransactWeb/js/fieldsetCollapse.js"></script>
        <script type="text/javascript" src="../TransactWeb/js/tcubmenu.js"></script>
        <script type="text/javascript" src="../TransactWeb/js/accordion.js"></script>
        <script type="text/javascript" src="../TransactWeb/js/scroller.js"></script>
        <link rel="stylesheet" type="text/css" href="../TransactWeb/css/tcubaccd.css" />
        <link rel="stylesheet" type="text/css" href="../TransactWeb/css/promotion.css" />
        <link rel="stylesheet" type="text/css" href="../TransactWeb/css/templatestyle.css" />
        <link rel="stylesheet" type="text/css" href="../TransactWeb/css/tcubeadmin.css" />
        <link rel="stylesheet" type="text/css" href="../TransactWeb/css/gridsys.css" />
        <link rel="stylesheet" type="text/css" href="../TransactWeb/css/reset1.css" />
        <link rel="stylesheet" type="text/css" href="../TransactWeb/css/cm.css" />
        <!-- InstanceBeginEditable name="head" -->
        <!-- InstanceEndEditable -->
        <link href="../TransactWeb/css/gridsys.css" rel="stylesheet" type="text/css" />
        <link href="../TransactWeb/css/templatestyle.css" rel="stylesheet" type="text/css" />
        <style>
            a {color:#000;}
        </style>
    </head>
    <body>
        <!-- InstanceBeginRepeat name="Header" --><!-- InstanceBeginRepeatEntry -->
        <div id="header_bg">
            <div class="container_12" id="lang_bar">
                <div class="grid_6 push_5" id="lang">
                    <table width="480" border="0">
                        <tr>
                            <td width="30"><a href="CustAccountRegistration">Register</a></td>
                            <td width="50"><a href="Home">Home</a></td> <!--<td width="50">Contact Us</td>-->
                            <td width="40">SiteMap</td>
                            <td width="200"> Language  :  English | Bahasa Indonesia | 简体中文 </td>

                        </tr>
                    </table>
                </div>
            </div>
            <div class="container_12"> 
                <div class="grid_3 push_3 header_menu">About.</div>
                <div class="grid_2 push_2 header_menu"><a href="CustGetListOfPartners">Browse.</a></div>
                <div class="grid_2 push_2 header_menu" id="plan">Plan.</div>
                <div class="grid_3 push_2 header_menu">Socialize.</div>
                <div class="clear"></div>

                <div class="grid_1 push_3" id="header_sbabout">FoodSage<br />Singapore</div>
                <div class="grid_2 push_3" id="header_sbbrowse">Restaurant List <br />
                    Places of Attraction</div>
                <div class="grid_2 push_2" id="header_sbplan">Your Itinerary</div>
                <div class="grid_2 push_1" id="header_sbsocial">mySage &nbsp; &nbsp;Classified<br /> Mobile Application</div>
                <div class="clear"></div>
            </div>
        </div>

        <!-----------------------------------------------------------------------------------------------------------------> 
        <%
            ArrayList data = (ArrayList) request.getAttribute("data");
            int result = ((Integer) data.get(0)).intValue();
            if (result == Constants.STATUS_NEW_SESSION || result == Constants.STATUS_WRONG_PASSWORD || result == Constants.STATUS_USER_INACTIVATED || result == Constants.STATUS_ACCOUNT_BANNED) {
        %>

        <script type="text/javascript">
            $(document).ready(function () {
                var timezone = jzTimezoneDetector.determine_timezone().timezone;
                $('#timezone').val(timezone.olson_tz);
            });
        </script>
        <div id="login">
            <div class="container_12">
                <div class="grid_8 push_4" id="loginfields">
                    <form action="https://localhost:8181/portal/public/CustLoginStatus" name="CustLogin" method="post">
                        Username : <input name="username" type="text" /> &nbsp;&nbsp; 
                        Password : <input name="password" type="password" />
                        <input type="hidden" name="timezone" id="timezone"/>
                        <input name="login" type="submit" value="Login" /><br/>
                    </form>

                    <% if (result == Constants.STATUS_NEW_SESSION) {
                    %>

                    <%        } else if (result == Constants.STATUS_WRONG_PASSWORD) {
                    %>
                    <font color ="black">You Entered The Wrong Username or Password.</font>
                    <%        } else if (result == Constants.STATUS_USER_INACTIVATED) {
                    %>
                    <font color ="black">
                        You are not allowed to login at the moment.<br/>
                        We have sent an activation email to your Email account. <br/>
                        Please proceed to activate your account first.<br/>
                    </font>
                    <%        } else {
                    %>
                    <font color ="black">Your account has been banned.</font>
                </div>
            </div>
        </div>      

        <%                }
        } else {
            CustomerState us = (CustomerState) session.getAttribute("user");
        %>

        <div id="login">
            <div class="container_12">
                <div class="grid_5" id="welcome">
                    Welcome <%= us.getUsername()%>!
                </div>
            </div>
        </div>

        <%            }
        %>
        <!----------------------------------------------------------------------------------------------------------------->           

        <!-- InstanceEndRepeatEntry --><!-- InstanceEndRepeat -->
        <!-- InstanceBeginEditable name="Content" --><div class="container_12">
            <div class="grid_4 restdesc">
                <ul id="accordion">
                    <li>

                        <span class="itplan"><img src="../TransactWeb/img/cm/airplane.png" width="50" height="50" alt="travel" /> &nbsp;Itinerary Planner<br /><br />
                            <span style="font-size:12px;"> Singapore, September 2011<br />
                                September 20 - September 22</span>
                        </span>

                    </li>
                    <li>
                        <a class="heading">Day 1 - 20 September</a>
                        <ul>
                            <li><a href="OutletPage"><b>Shangri-La The Line</b><br />Category : Buffet<br /> Type : F&amp;B    </a><br /> 
                                <a href="http://localhost:8080/portal/public/CustMakeReservation?id=123&action=9&reserve=Make+Reservation" class="reserve">Make Reservation Now</a></li>
                            <li><a href="OutletPage"><b>Chuan Yang Ji Mutton Soup Steamboat</b><br />Category : Steamboat<br /> Type : F&amp;B    </a><br /> 
                                <a href="http://localhost:8080/portal/public/CustMakeReservation?id=123&action=9&reserve=Make+Reservation" class="reserve">Make Reservation Now</a></li>
                            <li><a href="OutletPage"><b>Wild Olives</b><br />Category : Italian<br /> Type : F&amp;B   </a><br /> 
                                <a href="http://localhost:8080/portal/public/CustMakeReservation?id=123&action=9&reserve=Make+Reservation" class="reserve">Make Reservation Now</a></li>
                        </ul>
                    </li>
                    <li>
                        <a class="heading">Day 2 - 21 September</a>
                        <ul>
                            <li><a href="OutletPage"><b>Betel Box Living Bistro</b><br />Category : Fusion <br /> Type : F&amp;B   </a><br /> 
                                <a href="http://localhost:8080/portal/public/CustMakeReservation?id=123&action=9&reserve=Make+Reservation" class="reserve">Make Reservation Now</a></li>
                            <li><a href="OutletPage"><b>Ocean Kingdom Live Seafood Restaurant</b><br />Category : Seafood<br /> Type : F&amp;B    </a><br /> 
                                <a href="http://localhost:8080/portal/public/CustMakeReservation?id=123&action=9&reserve=Make+Reservation" class="reserve">Make Reservation Now</a></li>

                        </ul>
                    </li>
                    <li>
                        <a class="heading">Day 3 - 22 September</a>
                        <ul>
                            <li><a href="#"><b>The Mexican Taco Bar</b><br />Category : Latin America<br /> Type : F&amp;B    </a><br /> <a href="#" class="reserve">Make Reservation Now</a></li>
                            <li><a href="#"><b>The Ballet Season</b><br />Category : Performance<br /> Type : Ticketing   </a><br /> 
                                <a href="#" class="ticket">Buy Tickets Now</a></li>
                            <li><a href="#"><b>Elton John &amp; Band Greatest Hits Tour</b><br />
                                    Category : Concert<br /> 
                                    Type : Ticketing</a><br /> <a href="#" class="ticket">Buy Tickets Now</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
        <div class="grid_6">
            <div class="resttitle">The Line @ Shangri-La Hotel</div>
            <div class="restdesc">Address : 22 Orange Grove Road, Basement Shangri-la Hotel, Singapore    <br />Telephone : (65) 62847710<br />Opening Hours :<br />Breakfast: 6am – 10.30am     	(Weekends to 11 am) <br />Lunch: 12noon – 2.30pm (Weekends and Public Holidays to 3 pm) <br />Dinner: 6.30pm – 10.30pm (Weekends and Public Holidays start at 6pm) <br />Supper: 10.30 pm – 6 am<br /><br />
                <a href="#" id="web">Visit Website</a></div><br />

            <img src="../TransactWeb/img/cm/theline.jpg" width="379" height="284" alt="theline" /><br />
            <br />
            <img src="../TransactWeb/img/cm/reststats.jpg" width="379" height="179" alt="stats" /> </div> 

        <div class="grid_2">
            <div class="thirdcol"></div>
            <img src="../TransactWeb/img/cm/setmenu.png" width="128" height="26" alt="view set menus" class="viewsm" />
            <img src="../TransactWeb/img/cm/placeset.png" width="132" height="29" alt="place set order" class="plcorder" />
            <img src="../TransactWeb/img/cm/makereserv.png" width="133" height="29" alt="make reservations" class="mkresv" />
            <img src="../TransactWeb/img/cm/recommendation.png" width="140" height="398" alt="recommendations" class="recomm" /></div>
    </div>
    <!-- InstanceEndEditable -->
    <!-- InstanceBeginRepeat name="Footer" --><!-- InstanceBeginRepeatEntry -->
    <div id="footer_bar">
        <div class="container_12">
            <div class="grid_12" id="footer">&copy; &nbsp;Copyright FoodSage</div>
        </div>
    </div>
    <!-- InstanceEndRepeatEntry --><!-- InstanceEndRepeat -->
</body>
<!-- InstanceEnd -->
</html>
